package com.lfs.dingtalk.robot.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * {
 *     "body": {
 *         "result": {
 *             "deliverResults": [
 *                 {
 *                     "carrierId": "13mm832ZUqjC1KBq6qM5by9n0MW9ihFHi4vHdNGrFEM=",
 *                     "errorMsg": "",
 *                     "spaceId": "DiPiipdwiPcOpbKaaxHqbXKHQiEiE",
 *                     "spaceType": "IM_ROBOT",
 *                     "success": true
 *                 }
 *             ],
 *             "outTrackId": "lfs2ce64fe7-ce48-46e1-b22a-a90a0f12b8ed"
 *         },
 *         "success": true
 *     },
 *     "headers": {
 *         "access-control-allow-origin": "*",
 *         "date": "Wed, 19 Feb 2025 01:47:00 GMT",
 *         "server": "Tengine",
 *         "x-acs-request-id": "0ACCC7B8-375C-7A0E-AFA5-F45F17C4BB42",
 *         "access-control-allow-headers": "X-Requested-With, X-Sequence, _aop_secret, _aop_signature, x-acs-dingtalk-access-token",
 *         "content-type": "application/json;charset=utf-8",
 *         "access-control-expose-headers": "*",
 *         "x-acs-trace-id": "1b844c99ea0c0cdbc058026e77aeb316"
 *     },
 *     "statusCode": 200
 * }
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class PushResponseDto {
    private Body body;
    private Headers headers;
    private Integer statusCode;

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Body {
        private Result result;
        private Boolean success;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Result {
        private String outTrackId;
        private Boolean success;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Headers {
        private String accessControlAllowOrigin;
        private String date;
        private String server;
        private String xAcsRequestId;
        private String accessControlAllowHeaders;
        private String contentType;
        private String accessControlExposeHeaders;
        private String xAcsTraceId;
    }
}
